﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


using System.Data;
using TRPOP.Common;

namespace TRPOP.CMS.Web.Admin
{
    /// <summary>
    /// 获得右键菜单html代码  
    /// </summary>
    public partial class GetContextMenu : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.ClearContent();
            string strName = RequestHelper.RequestString("name");
            Response.Expires = -1;
            Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
            Response.CacheControl = "no-cache";
            switch (strName.ToLower())
            {
                case "system":
                case "model":
                case "node":
                case "publish":
                    DataTable dt = TRPOP.CMS.Plugin.Config.MenuConfig.GetContextMenu(strName.ToLower());
                    foreach (DataRow dr in dt.Rows)
                    {
                        Response.Write(dr["menuvalue"]);
                    }                    
                    break;
                default:

                    break;
            } 
        }
    }
}
